//
//  BaseAction.m
//
//
//  Created by gynjobs on 2017/8/14.
//  Copyright © 2017年 gynjobs. All rights reserved.
//

#import "BaseAction.h"

@implementation BaseAction
-(id)getErrorMsg:(NSError*)error{
    
    if(error){
        NSString * error_msg = [[error userInfo] valueForKey:NSLocalizedDescriptionKey];
        return error_msg;
        
    }
    
    return @"";
}

+ (BOOL)isLogin{
    return NO;
//    id uid  =  [[CacheHelper getInstance] getUserId];
//    if (uid) {
//        
//        return YES;
//    }
//    return NO;
}

+ (BOOL)isLoginNav{
    return NO;
//    id uid  =  [[CacheHelper getInstance] getUserId];
//    if (uid) {
//        
//        return YES;
//    }else{
//        
//        UIViewController * rootController = [[HomeTabManager getInstance] tabBarController];
//        id loginVc = [LoginMainController createNavWithHome];
//        [rootController presentViewController:loginVc animated:YES completion:nil];
//        
//        return NO;
//    }
    
}

- (BOOL)isLoginWithController:(UIViewController *)controller{
    return NO;
//    id uid  =  [[CacheHelper getInstance] getUserId];
//    if (uid) {
//        return YES;
//    }else{
//        id loginVc = [[NavControllerFactory getInstance] createNav:NAV2 rootController:[[LoginQuicklyController alloc] init]];//[LoginMainController createNav];
//        [controller presentViewController:loginVc animated:YES completion:nil];
//        return NO;
//    }
}

@end
